from django.urls import re_path

from xiong_tao169.view import collection_enterprise, collection_recruit, enterprise_detail, hotlist, recruit_detail, search, visit_recruits

urlpatterns = [
    # 热门企业
    re_path(r'^enterprise/search/hotlist/$', hotlist.HostListView.as_view()),
    # 收藏和取消收藏公司
    re_path(r'enterprise/(?P<id>\d+)/collect/$', collection_enterprise.CollectionEnterpriseView.as_view()),
    # 取消收藏公司
    re_path(r'enterprise/(?P<id>\d+)/cancelcollect/$', collection_enterprise.CancelCollectEnterpriseView.as_view()),
    # 搜索职位
    re_path(r'recruits/search/city/keyword/$', search.SearchView.as_view()),
    # 职位详情
    re_path(r'recruits/(?P<id>\d+)/$', recruit_detail.RecruitdetailkView.as_view()),
    # 增加职位访问次数
    re_path(r'recruits/(?P<id>\d+)/visit/$', visit_recruits.VisitRecruitsView.as_view()),
    # 收藏职位
    re_path(r'recruits/(?P<id>\d+)/collect/$', collection_recruit.CollectionRecruitView.as_view()),
    # 取消收藏职位
    re_path(r'recruits/(?P<id>\d+)/cancelcollect/$', collection_recruit.CancelCollectRecruitView.as_view()),
    # 企业详情
    re_path(r'enterprise/(?P<id>\d+)/$', enterprise_detail.EnterprisedetailkView.as_view()),

]
